package com.nine.flow.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.nine.flow.dtos.MyFlowProcDefDto;
import com.nine.flow.service.MyFlowDefinitionService;
import com.nine.flow.vos.MyFlowProcDefVo;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author nine
 * @version 1.0
 * @description TODO
 * @date 2023/7/20 22:24
 */
@RestController
@RequestMapping("flowable/definition")
public class MyFlowDefinitionController extends BaseController {

	@Autowired
	private MyFlowDefinitionService myFlowDefinitionService;

	@Anonymous
	@PostMapping("/list")
	public AjaxResult list(@RequestBody MyFlowProcDefVo vo){
		IPage<MyFlowProcDefDto> page = myFlowDefinitionService.listPage(vo);
		return AjaxResult.success(page);
	}

}
